package com.app.community.exception;

/**
 * 定义了一个错误代码枚举类
 * created by czy on 2020/11/24 21:18
 **/
public enum ErrorCodeEnum {
    HAVENOTLOGIN(1000,"您还未登录~"),
    INVALIDTITLELENGTH(1001,"标题字数不能少于4字"),
    INVALIDQUESTIONLENGTH(1002,"详情字数不能少于8字"),
    GETNOTHING(1003,"请输入一些内容。"),
    LOGINREPEATLY(1004,"请勿重复登陆。"),
    AUTHENTICERROR(1005,"用户名或密码错误！"),
    INVALIDEMAIL(1006,"请输入正确的邮箱。"),
    HAVEREGISTER(1007,"该邮箱已注册。"),
    INITIALPASSWORDERROR(1008,"请初始化一个密码！"),
    HAVENOTCONFIRMPASSWORD(1009,"请确认密码！"),
    PASSWORDNOTMATCH(1010,"两次密码不同！"),
    EMPTYVERTIFICATIONCODE(1011,"验证码不能为空！"),
    ERRORVERTIFICATIONCODE(1012,"验证码错误!"),
    USERNOTEXIST(1013,"用户不存在！");


    //    错误码
    private final Integer code;
//描述
    private final String description;


    public Integer getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    ErrorCodeEnum(Integer code, String description) {
        this.code = code;
        this.description = description;
    }

}
